package com.bafa.objects.season;

import java.util.ArrayList;
import java.util.TreeMap;

import com.bafa.objects.Match;
public class Season {
    private boolean completed;
    
    private TreeMap divisions = new TreeMap();
    private int id;
    private boolean league;
    private String name;
    private boolean switchedOn;
    private int year;
	private TreeMap cupRounds = new TreeMap();
    public Season() {
    }


   

	public void addCupRounds(String id,Round round){
		cupRounds.put(id,round);
	}
   

	public void addDivision(int id, Division d){
        divisions.put(id,d);
    }
	
    public void enterDivision(Division d){
        divisions.put(d.getDivision(),d);
    }

    public void enterMatch(Match match){
		((Division)divisions.get(match.getDivision())).enterMatch(match);
	}

    public TreeMap getDivisions() {
        return divisions;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getYear() {
        return year;
    }

    public boolean isCompleted() {
        return completed;
    }

    public boolean isLeague() {
        return league;
    }

    public boolean isSwitchedOn() {
        return switchedOn;
    }

    public void removeMatch(Match match){
		((Division)divisions.get(match.getDivision())).removeFixture(match);
	}

    public void setCompleted(boolean completed) {
        this.completed = completed;
    }
    
    public void setDivisions(TreeMap divisions) {
        this.divisions = divisions;
    }
	
	public void setId(int id) {
        this.id = id;
    }
	
	public void setLeague(boolean league) {
        this.league = league;
    }
	
	public void setName(String name) {
        this.name = name;
    }
	public void setSwitchedOn(boolean switchedOn) {
        this.switchedOn = switchedOn;
    }
	
	public void setYear(int year) {
        this.year = year;
    }




	public TreeMap getCupRounds() {
		return cupRounds;
	}




	public void setCupRounds(TreeMap cupRounds) {
		this.cupRounds = cupRounds;
	}
	
	
}
